home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / ELECTRON / PCB_DESI / 1540.ZIP / PCBCA110.ZIP / CELL.H < prev    next >
C/C++ Source or Header  |  1990-11-18  |  3KB  |  77 lines

  1. /* the low-order bit indicates a hole */
  2. #define HOLE            0x00000001L    /* a conducting hole */
  3.  
  4. /* traces radiating outward from a hole to a side or corner */
  5. #define HOLE_NORTH        0x00000002L    /* upward        */
  6. #define HOLE_NORTHEAST        0x00000004L    /* upward and right    */
  7. #define HOLE_EAST        0x00000008L    /* to the right        */
  8. #define HOLE_SOUTHEAST        0x00000010L    /* downward and right    */
  9. #define HOLE_SOUTH        0x00000020L    /* downward        */
  10. #define HOLE_SOUTHWEST        0x00000040L    /* downward and left    */
  11. #define HOLE_WEST        0x00000080L    /* to the left        */
  12. #define HOLE_NORTHWEST        0x00000100L    /* upward and left    */
  13.  
  14. /* straight lines through the center */
  15. #define LINE_HORIZONTAL        0x00000002L    /* left-to-right line    */
  16. #define LINE_VERTICAL        0x00000004L    /* top-to-bottom line    */
  17.  
  18. /* lines cutting across a corner, connecting adjacent sides */
  19. #define CORNER_NORTHEAST    0x00000008L    /* upper right corner    */
  20. #define CORNER_SOUTHEAST    0x00000010L    /* lower right corner    */
  21. #define CORNER_SOUTHWEST    0x00000020L    /* lower left corner    */
  22. #define CORNER_NORTHWEST    0x00000040L    /* upper left corner    */
  23.  
  24. /* diagonal lines through the center */
  25. #define DIAG_NEtoSW        0x00000080L    /* northeast to southwest */
  26. #define DIAG_SEtoNW        0x00000100L    /* southeast to northwest */
  27.  
  28. /* 135 degree angle side-to-far-corner lines */
  29. #define BENT_NtoSE        0x00000200L    /* north to southeast    */
  30. #define BENT_NtoSW        0x00000400L    /* north to southwest    */
  31. #define BENT_EtoSW        0x00000800L    /* east to southwest    */
  32. #define BENT_EtoNW        0x00001000L    /* east to northwest    */
  33. #define BENT_StoNW        0x00002000L    /* south to northwest    */
  34. #define BENT_StoNE        0x00004000L    /* south to northeast    */
  35. #define BENT_WtoNE        0x00008000L    /* west to northeast    */
  36. #define BENT_WtoSE        0x00010000L    /* west to southeast    */
  37.  
  38. /* 90 degree corner-to-adjacent-corner lines */
  39. #define ANGLE_NEtoSE        0x00020000L    /* northeast to southeast */
  40. #define ANGLE_SEtoSW        0x00040000L    /* southeast to southwest */
  41. #define ANGLE_SWtoNW        0x00080000L    /* southwest to northwest */
  42. #define ANGLE_NWtoNE        0x00100000L    /* northwest to northeast */
  43.  
  44. /* 45 degree angle side-to-near-corner lines */
  45. #define SHARP_NtoNE        0x00200000L    /* north to northeast    */
  46. #define SHARP_EtoNE        0x00400000L    /* east to northeast    */
  47. #define SHARP_EtoSE        0x00800000L    /* east to southeast    */
  48. #define SHARP_StoSE        0x01000000L    /* south to southeast    */
  49. #define SHARP_StoSW        0x02000000L    /* south to southwest    */
  50. #define SHARP_WtoSW        0x04000000L    /* west to southwest    */
  51. #define SHARP_WtoNW        0x08000000L    /* west to northwest    */
  52. #define SHARP_NtoNW        0x10000000L    /* north to northwest    */
  53.  
  54. /* directions the cell can be reached from (point to previous cell) */
  55. #define FROM_NOWHERE        0
  56. #define FROM_NORTH        1
  57. #define FROM_NORTHEAST        2
  58. #define FROM_EAST        3
  59. #define FROM_SOUTHEAST        4
  60. #define FROM_SOUTH        5
  61. #define FROM_SOUTHWEST        6
  62. #define FROM_WEST        7
  63. #define FROM_NORTHWEST        8
  64. #define FROM_OTHERSIDE        9
  65.  
  66. #define    TOP    0
  67. #define BOTTOM    1
  68. #define EMPTY    0
  69. #define ILLEGAL    -1
  70.  
  71. #ifdef VMS
  72. #define far
  73. #define stricmp strcmp
  74. #define _fmalloc malloc
  75. #define _ffree free
  76. #endif
  77.